From: Jyrki Gadinger Date: Tue, 18 Feb 2025 08:49:09 +0000 (+0100) Subject: vfs: use native separators for displayed error message X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~2^2~54^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=fcc532bafbe506a88ac53637d1b3c3377a5ec3cf;p=nextcloud-desktop.git vfs: use native separators for displayed error message i.e. `C:\Nextcloud` instead of `C:/Nextcloud` Signed-off-by: Jyrki Gadinger --- diff --git a/src/common/vfs.cpp b/src/common/vfs.cpp index 2e84fb2fb..61b82a505 100644 --- a/src/common/vfs.cpp +++ b/src/common/vfs.cpp @@ -71,16 +71,17 @@ Result Vfs::checkAvailability(const QString &path, Vfs::Mode mode #ifdef Q_OS_WIN if (mode == Mode::WindowsCfApi) { const auto info = QFileInfo(path); + const auto nativePath = QDir::toNativeSeparators(path); if (QDir(info.canonicalFilePath()).isRoot()) { - return tr("Please choose a different location. %1 is a drive. It doesn't support virtual files.").arg(path); + return tr("Please choose a different location. %1 is a drive. It doesn't support virtual files.").arg(nativePath); } if (const auto fileSystemForPath = FileSystem::fileSystemForPath(info.absoluteFilePath()); fileSystemForPath != QLatin1String("NTFS")) { - return tr("Please choose a different location. %1 isn't a NTFS file system. It doesn't support virtual files.").arg(path); + return tr("Please choose a different location. %1 isn't a NTFS file system. It doesn't support virtual files.").arg(nativePath); } const auto type = GetDriveTypeW(reinterpret_cast(QDir::toNativeSeparators(info.absoluteFilePath().mid(0, 3)).utf16())); if (type == DRIVE_REMOTE) { - return tr("Please choose a different location. %1 is a network drive. It doesn't support virtual files.").arg(path); + return tr("Please choose a different location. %1 is a network drive. It doesn't support virtual files.").arg(nativePath); } } #else